<template>
  <ElMenu>
    <template v-for="d in data">
      <Resub :data="d" :key="d.id"></Resub>
    </template>
    <!-- <template v-for="d in data">
      <ElSubmenu v-if="d.children" :key="'submenu' + d.id">
        <template slot="title">{{ d.title }}</template>
        <Resub :data="d"></Resub>
      </ElSubmenu>
      <ElMenuItem v-else :key="'menu' + d.id">
        {{ d.title }}
      </ElMenuItem>
    </template> -->
  </ElMenu>
</template>

<script>
import ElMenu from './ElMenu.vue'
// import ElMenuItem from './ElMenuItem.vue'
// import ElSubmenu from './ElSubmenu.vue'
import Resub from './Resub.vue'
export default {
  name: 'Menu',
  // components: { ElMenu, ElMenuItem, ElSubmenu, Resub },
  components: { ElMenu, Resub },
  props: {
    data: {
      type: Array
    }
  }
}
</script>

<style lang="scss" scoped></style>
